<template>
  <view class="desc">
    <view class="title">{{ detail.title }}</view>
    <view class="title_sub">{{ detail.title_sub }}</view>
    <!-- 华手mate60要这么处理 -->
    <v-price :product="detail" v-if="detail && detail.price" />
    <view class="stock">库存:{{ detail.stock }}</view>
  </view>
</template>

<script>
import Price from '../../../components/price/index'
export default {
  props: ['detail'],
  components: {
    'v-price': Price
  },
  data() {
    return {
    }
  },
  methods: {

  }
}
</script>

<style scoped lang="scss">
.desc {
  margin: 20rpx 0;
  padding: 20rpx;
  background: white;
  color: $main_text_color;
  border-radius: 10rpx;
  view {
    line-height: 44rpx;
    //font-size: 24rpx;
    &.g {
      display: flex;
      align-items: center;
      .price {
        margin-right: 10px;
      }
      .price_buy {
        font-weight: 32rpx;
        background: #f3f5f7;
        padding: 0 20rpx;
      }
    }
    &.title {
      font-size: 32rpx;
      font-weight: 700;
      margin-bottom: 10rpx;
    }
    &.title_sub {
      color: #999999;
      margin-bottom: 10rpx;
    }
    &.price {
      font-size: 32rpx;
      font-weight: 700;
      color: red;
      line-height: 60rpx;
      display: inline-block;
    }
    &.price_old {
      font-size: 32rpx;
      color: $second_text_color;
      text-decoration: line-through;
      display: inline-block;
      margin-left: 20rpx;
    }
    &.stock {
      padding-top: 10rpx;
      font-size: 24rpx;
      color: #999999;
    }
    &.sell {
      color: #ccc;
    }
  }
}
</style>
